package com.fate.framework.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fate.framework.dto.log.LogPageDTO;
import com.fate.framework.entity.Log;
import com.fate.framework.mapper.LogMapper;
import com.fate.framework.service.ILogService;
import com.fate.framework.utils.SystemUtil;
import org.springframework.stereotype.Service;

/**
 * @author 47349
 * @description 针对表【sys_log(系统日志表)】的数据库操作Service实现
 * @createDate 2024-08-09 09:09:51
 */
@Service
public class LogServiceImpl extends ServiceImpl<LogMapper, Log> implements ILogService {

  public Page<Log> getPageList(LogPageDTO pageDTO) {
    Page<Log> page = SystemUtil.buildPageFromDTO(pageDTO, Log.class);
    return this.lambdaQuery().orderByDesc(Log::getCreateDate).page(page);
  }
}
